<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" />
<title>话题分类</title>
<link href="../member/images/member.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../images/js/j.js"></script>
<script language="javascript" type="text/javascript" src="../member/js/table_function.js"></script>
<script language="javascript" type="text/javascript">
function categories(_id){
	var f=document.createElement('form');
	f.action="";f.method="post";
	document.body.appendChild(f);
	if(true){
		var b=document.createElement('input');
		b.type='hidden';
		b.name='categories';
		b.value=document.getElementById('categories-'+_id).value;
		f.appendChild(b);
		var c=document.createElement('input');
		c.type='hidden';
		c.name='orders';
		c.value=document.getElementById('orders-'+_id).value;
		f.appendChild(c);
		var d=document.createElement('input');
		d.type='hidden';
		d.name='userit';
		d.value=document.getElementById('userit-'+_id).checked;
		f.appendChild(d);
		var e=document.createElement('input');
		e.type='hidden';
		e.name='action';
		e.value='edit';
		f.appendChild(e);
		var g=document.createElement('input');
		g.type='hidden';
		g.name='categoriesid';
		g.value=_id;
		f.appendChild(g);
	}
	f.submit();
}
</script>
</head>
<body>
<?php  include(DEDEMEMBER."./templets/head.htm"); ?>
<div class="wrapper lineT">
  <div class="mainBox">
    <div class="main">
      <?php  include(DEDEMEMBER."./templets/menu.php");?>
      <div class="dedeMain">
        <div class="location">管理<i>|</i><a href="../group/group.php?id=<?php echo $id?>" target="_blank"><?php echo $_GROUPS['groupname'];?></a></div>
        <div class="titleTabBar bgGreen lineTB">
          <ul>
            <li class="select"><a href="mygroup.php">创建的圈子</a></li>
            <!--<li><a href="myjoin.php">参与的圈子</a></li> -->
            <li><a href="myjoin.php">我的发帖</a></li>
          </ul>
        </div>
        <div class="mL10 mR10 mTB10">
          <div class="titleBar bgGrass lineB mB10">
            <div class="fLeft"><strong>修改公告</strong></div>
            <div class="fRight titSecondary white" style="margin-top:5px;"> 
            <em class="mR10"><a href="mygroup_manage.php?id=<?php echo $id;?>">基本资料</a></em> 
            <em class="mR10"><a href="mygroup_cate.php?id=<?php echo $id;?>">话题分类</a></em> 
            <em class="mR10"><a href="mygroup_member.php?id=<?php echo $id;?>">成员管理</a></em> 
            <em class="mR10"><a href="mygroup_skin.php?id=<?php echo $id;?>">自定义风格</a></em> 
            <em><a href="mygroup_notice.php?id=<?php echo $id;?>">修改公告</a></em></div>
          </div>
          <form class="mTB10 fRight" name="addcategories" action="" method="post">
            <input name="action" type="hidden" value="add" />
            新的话题分类：
            <input name="categories" type="text" class="text"/>
            排序
            <input style="width:30px;" class="text" name="neworders" type="text" value="50" size="4" maxlength="4" />
            <button class="button2" type="submit">添加</button>
          </form>
          <div class="clear"></div>
            <table cellspacing="1" class="list mT10">
              <thead>
                <tr>
                  <th width="10%">排序</th>
                  <th>分类名称</th>
                  <th width="10%">操作</th>
                </tr>
              </thead>
              <tbody>
                <?php
						$k = 0;
							if(!empty($smalltypes))
							{
								foreach($smalltypes as $k=>$rs)
								{
						?>
                <tr>
                  <td align="center"><input style="width:30px;" class="text" name="orders" size="4" id="orders-<?php echo $rs['id'];?>"  type="text" value="<?php echo $rs['disorder'];?>" size="4" maxlength="4" /></td>
                  <td><input name="userit" type="hidden" id="userit-<?php echo $rs['id'];?>" <?php if(in_array($rs['id'],$smalltype)) echo "checked='checked'";?> />
                    <input class="text" name="categories" size="30" type="text" id="categories-<?php echo $rs['id'];?>" value="<?php echo $rs['name'];?>" /></td>
                  <td align="center"><a href="javascript:categories(<?php echo $rs['id'];?>);">修改</a> <a href="mygroup_cate.php?id=<?php echo $id;?>&action=del&categoriesid=<?php echo $rs['id'];?>" onclick="return(confirm('删除后无法恢复,您确定删除吗?'))">删除</a></td>
                </tr>
                <?php
								}
							}
						?>
              </tbody>
            </table>
        </div>
      </div>
    </div>
    <div class="clear"></div>
  </div>
  <div class="clear"></div>
</div>
</div>
<?php  include(DEDEMEMBER."./templets/foot.htm");?>
</body>
</html>
